import request from '@/utils/request'

// 查询拼团列表
export function listGroupingProduct(query) {
  return request({
    url: '/points/groupingProduct/list',
    method: 'get',
    params: query
  })
}

// 查询拼团详细
export function getGroupingProduct(id) {
  return request({
    url: '/points/groupingProduct/' + id,
    method: 'get'
  })
}

// 新增拼团
export function addGroupingProduct(data) {
  return request({
    url: '/points/groupingProduct',
    method: 'post',
    data: data
  })
}

// 修改拼团
export function updateGroupingProduct(data) {
  return request({
    url: '/points/groupingProduct',
    method: 'put',
    data: data
  })
}

// 删除拼团
export function delGroupingProduct(id) {
  return request({
    url: '/points/groupingProduct/' + id,
    method: 'delete'
  })
}
